# $Id: PKGBUILD 88011 2013-04-09 21:50:08Z eric $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Víctor Martínez Romanos <vmromanos@gmail.com>

pkgname=qucs
pkgver=0.0.16
pkgrel=2
pkgdesc="An integrated circuit simulator with a graphical user interface"
arch=('i686' 'x86_64')
url="http://qucs.sourceforge.net"
license=('GPL')
depends=('qt3')
optdepends=('freehdl: to permit digital circuit simulation'
	    'asco: to enable circuit optimization'
	    'perl')
source=(http://downloads.sourceforge.net/sourceforge/qucs/$pkgname-$pkgver.tar.gz
	qucs-gcc-4.5.1.patch)
md5sums=('c916502171d422ab168fe5fc681b29d8'
         '6fd31dc632cdef53f8c2566ad782901a')

build() {
  cd $srcdir/$pkgname-$pkgver

  export PATH=$QTDIR/bin:$PATH

  [ $NOEXTRACT -eq 1 ] || patch -p1 <$srcdir/qucs-gcc-4.5.1.patch
  [ $NOEXTRACT -eq 1 ] || ./configure --prefix=/usr
  make
}

package() {
  cd $srcdir/$pkgname-$pkgver
  make DESTDIR=$pkgdir install
}
